package com.example.kafkademo.consumer;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class EventConsumer {
    @KafkaListener(topics = "topic-demo",groupId = "group-demo")
    public void listenEvent(String event) {
        System.out.println("读到的事件："+event);
    }
}
